import { request } from '@/utils/request.js'; //导入封装好的js文件

// ai聊天
export const aiChatApi = (data) => {
  return request({
    url: '/ai/chat',
    method: 'post',
    data: data
  });
};

// ai聊天流式输出
export const streamChatApi = (data) => {
  return request({
    url: '/ai/streamChat',
    method: 'post',
    data: data,
    requestType: 'text',
    header: {
      Accept: 'text/event-stream'
    }
  });
};
